package com.exam.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("角色实体")
@TableName(value = "user_role")
public class UserRole implements Serializable {

    //对应数据库的主键（uuid,自增ID，雪花算法，redis,zookeeper)
    @TableId(type = IdType.AUTO)
    //用于方法、字段，表示对model属性的说明或者数据操作更改
    @ApiModelProperty(value = "主键 用户ID",example = "1")
    private Integer id;

    @ApiModelProperty(value = "用户角色id",example = "1(学生) 2(教师) 3(管理员)")
    private Integer roleId;

    @ApiModelProperty(value = "用户角色名称",example = "1(学生) 2(教师) 3(管理员)")
    private String roleName;

    @ApiModelProperty(value = "权限对应的功能菜单",example = "JSON串")
    private String menuInfo;
}
